<<template>
    <div id='#goodsAtters'>
        <el-form :label-position="labelPosition" 
        label-width="80px" 
        :model="goodsattrsFrom">
            <el-form-item :label="v.attr_name" 
                v-for="(v,i) in $store.state.goods.goods_attrs" 
                :key=i
                >
               <el-input v-model="v.attr_vals"></el-input>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
export default {
    name:'goodsAtters',
    data() {
        return {
             //对齐方式
            labelPosition:'top',
            //form表单数据
            goodsattrsFrom: {
                subject: '',
                show_hook_face: '',
                system: '',
                appearance:'',
                power_dissipation:'',
                port:'',
                frequency:'',
                interactive_device:'',
                connectivity:''
            },
            fromOption:[
                {label:'主体-商品名称',fromKey:'subject'},
                {label:'显示-曲面',fromKey:'show_hook_face'},
                {label:'系统-智能电视',fromKey:'system'},
                {label:'外观-壁挂安装',fromKey:'appearance'},
                {label:'功耗-整机功率（W）',fromKey:'power_dissipation'},
                {label:'端口-模拟RF接口',fromKey:'port'},
                {label:'音频-扬声器数量',fromKey:'frequency'},
                {label:'交互设备-无线键鼠',fromKey:'interactive_device'},
                {label:'互联互通-多屏互动',fromKey:'connectivity'},
            ],
        }
    },
    mounted(){
        let data={sel:'only',id:6}
        this.$store.dispatch('categorie/Acs_getCategoriesAttributes',data)
        .then(res=>{
                this.$store.commit('goods/CHANGE_GOODS_ATTRS',res)
            }
        ).catch(err=>console.log(err))
    }
}
</script>
<style lang="scss" scoped>
    
</style>